#@layout()
#define main()
<h1>航线管理&nbsp;&nbsp;
    #if(session.user.role==1)
    <a href="/airroute/add">创建航线</a>
    #end
</h1>
#include("_search.html")
<div class="table_box">
    <table class="list">
        <tbody>
        <tr>
            <th width="4%" style="text-align:center;">id</th>
            <th width="20%" style="text-align:center;">航线编号</th>
            <th width="20%" style="text-align:center;">航线起点</th>
            <th width="20%" style="text-align:center;">航线终点</th>
            <th width="20%" style="text-align:center;">距离里程(公里)</th>
            #if(session.user.role==1)
            <th width="30%" style="text-align:center;">操作</th>
            #end
        </tr>

        #for(x : airroutePage.getList())
        <tr>
            <td style="text-align:center;">#(x.id)</td>
            <td style="text-align:center;">#(x.airrouteno)</td>
            <td style="text-align:center;">#(x.begin)</td>
            <td style="text-align:center;">#(x.end)</td>
            <td style="text-align:center;">#(x.distance)</td>
            #if(session.user.role==1)
            <td style="text-align:center;">
                &nbsp;&nbsp;<a href="/airroute/delete/#(x.id)">删除</a>
                &nbsp;&nbsp;<a href="/airroute/edit/#(x.id)">修改</a>
            </td>
            #end
        </tr>
        #end
        </tbody>
    </table>
    #@paginate(airroutePage.pageNumber, airroutePage.totalPage, "/airroute/")
</div>
#end